// ..add new app-locales here, so they'll be registered even if only updating
const APP_CONTENT_FOLDER = "content/";
const INST_TO_PROFILE = "Install "+APP_DISPLAY_NAME+" in your profile?\n(..you wont have to reinstall when updating the browser).\n\nClick Cancel to install "+APP_DISPLAY_NAME+" in the browser root.";
const ROOT_FAILED___TRY_INST_TO_PROFILE = "You didn't have permission to install as root.\n Would you like to force profile-installation?\n\n[Note: "+APP_DISPLAY_NAME+" WILL NOT FUNCTION in the profile for browsers-builds older than 6.24.03. This includes moz1.4.1 and fb.6]";
alert("Sorry: Adblock is already installed in your " + installedHere + ". "
+"\n\n\n\nIf you're running a recent dev-build, you can deinstall from preferences. "
+"\nFor all other versions, please consult the online-faq:"
+"\n\nadblock.mozdev.org/faq.html");
cancelInstall(-23); // we can't overwrite, so don't install further
}
else {
// runtime component registration only works since 2003-06-24..
var instToProfile = false;
if (alreadyInstalled) instToProfile = currentInProfile;
else if (buildID == 0 || buildID > 2003062400) instToProfile = confirm(INST_TO_PROFILE); // ..so, dont ask on prior builds.
// Add comp file
//if (!instToProfile) {
var compDir = getFolder(getFolder('Program'),'components');
if (!File.exists(getFolder(compDir,".autoreg"))) addFile(null, APP_REG_FILE, compDir, null);
var errComponent = addFile(null, APP_COMP_FILE, compDir, null);
if (errComponent != SUCCESS && instToProfile) alert("Adblock's Component failed to install.\n\nDon't worry- Adblock will attempt to install this file again, \nat startup. Just make sure you have write-privileges for \nthe application folder.");
//}
// install jar-file
var chromef = instToProfile ? getFolder("Profile", "chrome") : getFolder("chrome");
var errJar = addFile(APP_PACKAGE, APP_VERSION, APP_JAR_LOC, chromef, null);
// if root-install was attempted and failed, ask the user what to do